using HKB.Common;
using System;
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Diagnostics;
namespace HKB.Data.Dal.A_DeliverItemTableAdapters
{
	[GeneratedCode("System.Data.Design.TypedDataSetGenerator", "2.0.0.0"), DataObject(true), HelpKeyword("vs.data.TableAdapter"), Designer("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DesignerCategory("code"), ToolboxItem(true)]
	public class HLShop_DeliverItemTableAdapter : Component
	{
		private SqlDataAdapter _adapter;
		private SqlConnection _connection;
		private SqlCommand[] _commandCollection;
		private bool _clearBeforeFill;
		[System.Diagnostics.DebuggerNonUserCode]
		private SqlDataAdapter Adapter
		{
			get
			{
				if (this._adapter == null)
				{
					this.InitAdapter();
				}
				return this._adapter;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		internal SqlConnection Connection
		{
			get
			{
				if (this._connection == null)
				{
					this.InitConnection();
				}
				return this._connection;
			}
			set
			{
				this._connection = value;
				if (this.Adapter.InsertCommand != null)
				{
					this.Adapter.InsertCommand.Connection = value;
				}
				if (this.Adapter.DeleteCommand != null)
				{
					this.Adapter.DeleteCommand.Connection = value;
				}
				if (this.Adapter.UpdateCommand != null)
				{
					this.Adapter.UpdateCommand.Connection = value;
				}
				for (int i = 0; i < this.CommandCollection.Length; i++)
				{
					if (this.CommandCollection[i] != null)
					{
						this.CommandCollection[i].Connection = value;
					}
				}
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		protected SqlCommand[] CommandCollection
		{
			get
			{
				if (this._commandCollection == null)
				{
					this.InitCommandCollection();
				}
				return this._commandCollection;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public bool ClearBeforeFill
		{
			get
			{
				return this._clearBeforeFill;
			}
			set
			{
				this._clearBeforeFill = value;
			}
		}
		[System.Diagnostics.DebuggerNonUserCode]
		public HLShop_DeliverItemTableAdapter()
		{
			this.ClearBeforeFill = true;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitAdapter()
		{
			this._adapter = new SqlDataAdapter();
			DataTableMapping dataTableMapping = new DataTableMapping();
			dataTableMapping.SourceTable = "Table";
			dataTableMapping.DataSetTable = "HLShop_DeliverItem";
			dataTableMapping.ColumnMappings.Add("DeliverID", "DeliverID");
			dataTableMapping.ColumnMappings.Add("OrderID", "OrderID");
			dataTableMapping.ColumnMappings.Add("DeliverDate", "DeliverDate");
			dataTableMapping.ColumnMappings.Add("DeliverType", "DeliverType");
			dataTableMapping.ColumnMappings.Add("HandlerName", "HandlerName");
			dataTableMapping.ColumnMappings.Add("DeliverCompany", "DeliverCompany");
			dataTableMapping.ColumnMappings.Add("ExpressNumber", "ExpressNumber");
			dataTableMapping.ColumnMappings.Add("Remark", "Remark");
			dataTableMapping.ColumnMappings.Add("Received", "Received");
			dataTableMapping.ColumnMappings.Add("UserID", "UserID");
			dataTableMapping.ColumnMappings.Add("Inputer", "Inputer");
			dataTableMapping.ColumnMappings.Add("ControlFlag", "ControlFlag");
			this._adapter.TableMappings.Add(dataTableMapping);
			this._adapter.DeleteCommand = new SqlCommand();
			this._adapter.DeleteCommand.Connection = this.Connection;
			this._adapter.DeleteCommand.CommandText = "DELETE FROM [HLShop_DeliverItem] WHERE (([DeliverID] = @Original_DeliverID))";
			this._adapter.DeleteCommand.CommandType = CommandType.Text;
			this._adapter.DeleteCommand.Parameters.Add(new SqlParameter("@Original_DeliverID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DeliverID", DataRowVersion.Original, false, null, "", "", ""));
			this._adapter.InsertCommand = new SqlCommand();
			this._adapter.InsertCommand.Connection = this.Connection;
			this._adapter.InsertCommand.CommandText = "INSERT INTO [HLShop_DeliverItem] ([UserID], [OrderID], [DeliverDate], [DeliverType], [HandlerName], [DeliverCompany], [ExpressNumber], [Remark], [Received], [Inputer], [ControlFlag]) VALUES (@UserID, @OrderID, @DeliverDate, @DeliverType, @HandlerName, @DeliverCompany, @ExpressNumber, @Remark, @Received, @Inputer, @ControlFlag)";
			this._adapter.InsertCommand.CommandType = CommandType.Text;
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DeliverDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "DeliverDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DeliverType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DeliverType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@HandlerName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "HandlerName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@DeliverCompany", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "DeliverCompany", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ExpressNumber", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ExpressNumber", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Received", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Received", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@Inputer", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Inputer", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.InsertCommand.Parameters.Add(new SqlParameter("@ControlFlag", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ControlFlag", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand = new SqlCommand();
			this._adapter.UpdateCommand.Connection = this.Connection;
			this._adapter.UpdateCommand.CommandText = "UPDATE [HLShop_DeliverItem] SET [UserID] = @UserID, [OrderID] = @OrderID, [DeliverDate] = @DeliverDate, [DeliverType] = @DeliverType, [HandlerName] = @HandlerName, [DeliverCompany] = @DeliverCompany, [ExpressNumber] = @ExpressNumber, [Remark] = @Remark, [Received] = @Received, [Inputer] = @Inputer, [ControlFlag] = @ControlFlag WHERE (([DeliverID] = @Original_DeliverID))";
			this._adapter.UpdateCommand.CommandType = CommandType.Text;
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@UserID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "UserID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DeliverDate", SqlDbType.DateTime, 0, ParameterDirection.Input, 0, 0, "DeliverDate", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DeliverType", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DeliverType", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@HandlerName", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "HandlerName", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@DeliverCompany", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "DeliverCompany", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ExpressNumber", SqlDbType.NVarChar, 0, ParameterDirection.Input, 0, 0, "ExpressNumber", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Remark", SqlDbType.NText, 0, ParameterDirection.Input, 0, 0, "Remark", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Received", SqlDbType.Bit, 0, ParameterDirection.Input, 0, 0, "Received", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Inputer", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "Inputer", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@ControlFlag", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "ControlFlag", DataRowVersion.Current, false, null, "", "", ""));
			this._adapter.UpdateCommand.Parameters.Add(new SqlParameter("@Original_DeliverID", SqlDbType.Int, 0, ParameterDirection.Input, 0, 0, "DeliverID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitConnection()
		{
			this._connection = new SqlConnection();
			this._connection.ConnectionString = Conn.CurrenConnectionStrings;
		}
		[System.Diagnostics.DebuggerNonUserCode]
		private void InitCommandCollection()
		{
			this._commandCollection = new SqlCommand[9];
			this._commandCollection[0] = new SqlCommand();
			this._commandCollection[0].Connection = this.Connection;
			this._commandCollection[0].CommandText = "SELECT DeliverID, UserID, OrderID, DeliverDate, DeliverType, HandlerName, \r\n      DeliverCompany, ExpressNumber, Remark, Received, Inputer, ControlFlag\r\nFROM HLShop_DeliverItem";
			this._commandCollection[0].CommandType = CommandType.Text;
			this._commandCollection[1] = new SqlCommand();
			this._commandCollection[1].Connection = this.Connection;
			this._commandCollection[1].CommandText = "DELETE FROM [HLShop_DeliverItem] WHERE  [DeliverID]  in\r\n(SELECT * FROM fn_Split(@ArrayItemID,','))";
			this._commandCollection[1].CommandType = CommandType.Text;
			this._commandCollection[1].Parameters.Add(new SqlParameter("@ArrayItemID", SqlDbType.VarChar, 1024, ParameterDirection.Input, 0, 0, "", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[2] = new SqlCommand();
			this._commandCollection[2].Connection = this.Connection;
			this._commandCollection[2].CommandText = "SELECT DeliverID, OrderID,ControlFlag\r\nFROM HLShop_DeliverItem\r\nWHERE ControlFlag=0 AND DeliverType=0 AND Received=0 AND (DateDiff(d,GetDate(),(DateAdd(d,15,DeliverDate)))<0)";
			this._commandCollection[2].CommandType = CommandType.Text;
			this._commandCollection[3] = new SqlCommand();
			this._commandCollection[3].Connection = this.Connection;
			this._commandCollection[3].CommandText = "Pr_GetDeliverByUserNameInputerBegindDateEndDateType";
			this._commandCollection[3].CommandType = CommandType.StoredProcedure;
			this._commandCollection[3].Parameters.Add(new SqlParameter("@RETURN_VALUE", SqlDbType.Int, 4, ParameterDirection.ReturnValue, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@InputerID", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@HandlerName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@UserName", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@BeginDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@EndDate", SqlDbType.VarChar, 50, ParameterDirection.Input, 0, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[3].Parameters.Add(new SqlParameter("@DeliverType", SqlDbType.Int, 4, ParameterDirection.Input, 10, 0, null, DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[4] = new SqlCommand();
			this._commandCollection[4].Connection = this.Connection;
			this._commandCollection[4].CommandText = "SELECT ControlFlag, DeliverCompany, DeliverDate, DeliverID, DeliverType, ExpressNumber, HandlerName, Inputer, OrderID, Received, Remark, UserID FROM HLShop_DeliverItem WHERE (DeliverID = @DeliverID)";
			this._commandCollection[4].CommandType = CommandType.Text;
			this._commandCollection[4].Parameters.Add(new SqlParameter("@DeliverID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "DeliverID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[5] = new SqlCommand();
			this._commandCollection[5].Connection = this.Connection;
			this._commandCollection[5].CommandText = "SELECT ControlFlag, DeliverCompany, DeliverDate, DeliverID, DeliverType, ExpressNumber, HandlerName, Inputer, OrderID, Received, Remark, UserID FROM HLShop_DeliverItem WHERE (OrderID = @OrderID)";
			this._commandCollection[5].CommandType = CommandType.Text;
			this._commandCollection[5].Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[6] = new SqlCommand();
			this._commandCollection[6].Connection = this.Connection;
			this._commandCollection[6].CommandText = "UPDATE [HLShop_DeliverItem] SET  [Received] = 1 WHERE  [OrderID] = @OrderID and [DeliverType] =0 and [DeliverDate]=\r\n(select max( [DeliverDate]) from [HLShop_DeliverItem] where  OrderID=@OrderID\r\nand  [DeliverType] =0  )  ";
			this._commandCollection[6].CommandType = CommandType.Text;
			this._commandCollection[6].Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Original, false, null, "", "", ""));
			this._commandCollection[7] = new SqlCommand();
			this._commandCollection[7].Connection = this.Connection;
			this._commandCollection[7].CommandText = "UPDATE [HLShop_DeliverItem] SET [Received] = 1 WHERE ControlFlag=0 AND DeliverType=0 AND Received=0 AND (DateDiff(d,GetDate(),(DateAdd(d,15,DeliverDate)))<0)";
			this._commandCollection[7].CommandType = CommandType.Text;
			this._commandCollection[8] = new SqlCommand();
			this._commandCollection[8].Connection = this.Connection;
			this._commandCollection[8].CommandText = "UPDATE [HLShop_DeliverItem] SET [Received] = @Received WHERE ControlFlag=0 AND OrderID=@OrderID AND DeliverType=0 AND Received=0 AND (DateDiff(d,GetDate(),(DateAdd(d,15,DeliverDate)))<0)";
			this._commandCollection[8].CommandType = CommandType.Text;
			this._commandCollection[8].Parameters.Add(new SqlParameter("@Received", SqlDbType.Bit, 1, ParameterDirection.Input, 0, 0, "Received", DataRowVersion.Current, false, null, "", "", ""));
			this._commandCollection[8].Parameters.Add(new SqlParameter("@OrderID", SqlDbType.Int, 4, ParameterDirection.Input, 0, 0, "OrderID", DataRowVersion.Original, false, null, "", "", ""));
		}
		[DataObjectMethod(DataObjectMethodType.Select, true), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual A_DeliverItem.HLShop_DeliverItemDataTable GetAllDeliverItem()
		{
			this.Adapter.SelectCommand = this.CommandCollection[0];
			A_DeliverItem.HLShop_DeliverItemDataTable hLShop_DeliverItemDataTable = new A_DeliverItem.HLShop_DeliverItemDataTable();
			this.Adapter.Fill(hLShop_DeliverItemDataTable);
			return hLShop_DeliverItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual A_DeliverItem.HLShop_DeliverItemDataTable GetNotReceiveAfter15DaysOrderID()
		{
			this.Adapter.SelectCommand = this.CommandCollection[2];
			A_DeliverItem.HLShop_DeliverItemDataTable hLShop_DeliverItemDataTable = new A_DeliverItem.HLShop_DeliverItemDataTable();
			this.Adapter.Fill(hLShop_DeliverItemDataTable);
			return hLShop_DeliverItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual A_DeliverItem.HLShop_DeliverItemDataTable GetDeliverByUserNameInputerBegindDateEndDateType(int? InputerID, string HandlerName, string UserName, string BeginDate, string EndDate, int? DeliverType)
		{
			this.Adapter.SelectCommand = this.CommandCollection[3];
			if (InputerID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[1].Value = InputerID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
			}
			if (HandlerName == null)
			{
				this.Adapter.SelectCommand.Parameters[2].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[2].Value = HandlerName;
			}
			if (UserName == null)
			{
				this.Adapter.SelectCommand.Parameters[3].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[3].Value = UserName;
			}
			if (BeginDate == null)
			{
				this.Adapter.SelectCommand.Parameters[4].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[4].Value = BeginDate;
			}
			if (EndDate == null)
			{
				this.Adapter.SelectCommand.Parameters[5].Value = System.DBNull.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[5].Value = EndDate;
			}
			if (DeliverType.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[6].Value = DeliverType.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[6].Value = System.DBNull.Value;
			}
			A_DeliverItem.HLShop_DeliverItemDataTable hLShop_DeliverItemDataTable = new A_DeliverItem.HLShop_DeliverItemDataTable();
			this.Adapter.Fill(hLShop_DeliverItemDataTable);
			return hLShop_DeliverItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual A_DeliverItem.HLShop_DeliverItemDataTable GetDeliverItemByItemID(int DeliverID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[4];
			this.Adapter.SelectCommand.Parameters[0].Value = DeliverID;
			A_DeliverItem.HLShop_DeliverItemDataTable hLShop_DeliverItemDataTable = new A_DeliverItem.HLShop_DeliverItemDataTable();
			this.Adapter.Fill(hLShop_DeliverItemDataTable);
			return hLShop_DeliverItemDataTable;
		}
		[DataObjectMethod(DataObjectMethodType.Select, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual A_DeliverItem.HLShop_DeliverItemDataTable GetDeliverItemByOrderID(int? OrderID)
		{
			this.Adapter.SelectCommand = this.CommandCollection[5];
			if (OrderID.HasValue)
			{
				this.Adapter.SelectCommand.Parameters[0].Value = OrderID.Value;
			}
			else
			{
				this.Adapter.SelectCommand.Parameters[0].Value = System.DBNull.Value;
			}
			A_DeliverItem.HLShop_DeliverItemDataTable hLShop_DeliverItemDataTable = new A_DeliverItem.HLShop_DeliverItemDataTable();
			this.Adapter.Fill(hLShop_DeliverItemDataTable);
			return hLShop_DeliverItemDataTable;
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(A_DeliverItem.HLShop_DeliverItemDataTable dataTable)
		{
			return this.Adapter.Update(dataTable);
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(A_DeliverItem dataSet)
		{
			return this.Adapter.Update(dataSet, "HLShop_DeliverItem");
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow dataRow)
		{
			return this.Adapter.Update(new DataRow[]
			{
				dataRow
			});
		}
		[HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int Update(DataRow[] dataRows)
		{
			return this.Adapter.Update(dataRows);
		}
		[DataObjectMethod(DataObjectMethodType.Delete, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int DeleteDeliverItem(string ArrayItemID)
		{
			SqlCommand sqlCommand = this.CommandCollection[1];
			if (ArrayItemID == null)
			{
				throw new System.ArgumentNullException("ArrayItemID");
			}
			sqlCommand.Parameters[0].Value = ArrayItemID;
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int SetReceived(int? OrderID)
		{
			SqlCommand sqlCommand = this.CommandCollection[6];
			if (OrderID.HasValue)
			{
				sqlCommand.Parameters[0].Value = OrderID.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateAllReceiveAfter15Days()
		{
			SqlCommand sqlCommand = this.CommandCollection[7];
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
		[DataObjectMethod(DataObjectMethodType.Update, false), HelpKeyword("vs.data.TableAdapter"), System.Diagnostics.DebuggerNonUserCode]
		public virtual int UpdateReceiveByOrderIDAfter15Days(bool? Received, int? OrderID)
		{
			SqlCommand sqlCommand = this.CommandCollection[8];
			if (Received.HasValue)
			{
				sqlCommand.Parameters[0].Value = Received.Value;
			}
			else
			{
				sqlCommand.Parameters[0].Value = System.DBNull.Value;
			}
			if (OrderID.HasValue)
			{
				sqlCommand.Parameters[1].Value = OrderID.Value;
			}
			else
			{
				sqlCommand.Parameters[1].Value = System.DBNull.Value;
			}
			ConnectionState state = sqlCommand.Connection.State;
			if ((sqlCommand.Connection.State & ConnectionState.Open) != ConnectionState.Open)
			{
				sqlCommand.Connection.Open();
			}
			int result;
			try
			{
				result = sqlCommand.ExecuteNonQuery();
			}
			finally
			{
				if (state == ConnectionState.Closed)
				{
					sqlCommand.Connection.Close();
				}
			}
			return result;
		}
	}
}
